#!/bin/bash

# 这个脚本是建立一个名为allan的用户，并且给予它最高权限
# 并设置allan的mac可以直接登录
useradd allan
usermod -aG wheel allan
echo "allan,..199061" |passwd --stdin allan
mkdir /home/allan/.ssh
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDxYZ+C3uulnBCgXcK4/JIcZC5e9oYIHvvFeE2P2S/6MPeTDRx5DfL13Uf+Q3uJXn8ZumKDsLfG98f/2/7nMk6VrTfgq1lURyEwOdkSR/55xQfaizQ0KKjb3pboRE9tJaiXSgStwkR1bjA7eY1KnpL+cNB7N5IlORXU0DGkRCHoFaydjqiwV27mMUdnNrnY16FwhZNuCUrXGVHonmc9UZq+UoLJaUCjxoPh0kz4mPozPkZir8wgy+zqdxjKpvoyKI/0fBBIK8q40THZhre0kKv802I4ByDjeDA8vKaSwwFcmQ39ArMCS1bPJz1DutSvQDMu2IiFEhpYwT8TCxc7sRuz lqc_huli@163.com" >> /home/allan/.ssh/authorized_keys

chown -R allan:allan /home/allan/.ssh
chmod g-rwx /home/allan/.ssh
chmod o-rwx /home/allan/.ssh
